from game_api.base_class.usr_ import *


def game_cate_list(res):
    '''单个分类列表'''
    # 引入游戏分类
    Gcate = gameTop()
    req = res
    a=Gcate.catelist(req)
    res_data=a
    return res_data

def game_cate_lists(res):
    '''所有分类列表'''
    # 引入游戏分类
    Gcate = gameTop()
    a=Gcate.catelists()
    res_data=a
    return res_data



def game_top(res):
    '''排行榜'''
    # 引入游戏分类
    Gcate = gameTop()
    req = res
    l=Gcate.list(req)
    ll=Gcate.detail(l,'many')
    return ll


def game_one(res):
    '''单个游戏详情'''
    # 引入游戏分类
    Gcate = gameTop()
    req = res
    id = req['id']
    l=Gcate.onedetail(id)
    ll=Gcate.detail(l,'one')
    return ll

def game_tuijian(res):
    '''主页推荐的'''
    Gcate = gameTop()
    req = res
    a = Gcate.tuijian(req)
    ll = Gcate.detail(a, 'many')
    res_data = ll
    return res_data

def game_sousuo(res):
    '''搜索'''
    Gcate = gameTop()
    req = res
    a = Gcate.manygame(req)
    ll = Gcate.detail(a, 'many')
    res_data = ll
    return res_data